import fetch from '@/api'

// 作业班组
// 作业班组-分页查询
export function getWorkTeamList(params) {
    return fetch({
        method:'get',
        url:`/workTeam`,
        params
    })
}
// 作业班组-新增
export function addWorkTeam(data) {
    return fetch({
        method:'post',
        url:`/workTeam`,
        data
    })
}
// 作业班组-编辑
export function updateWorkTeam(id,data) {
    return fetch({
        method:'put',
        url:`/workTeam/${id}`,
        data
    })
}
// 作业班组-删除
export function deleteWorkTeam(id) {
    return fetch({
        method:'delete',
        url:`/workTeam/${id}`,
    })
}

// 作业人员
// 作业人员-分页查询
export function getOperatorList(params) {
    return fetch({
        method:'get',
        url:`/jobPerson`,
        params
    })
}
// 作业人员-新增
export function addOperator(data) {
    return fetch({
        method:'post',
        url:`/jobPerson`,
        data
    })
}
// 作业人员-编辑
export function updateOperator(id,data) {
    return fetch({
        method:'put',
        url:`/jobPerson/${id}`,
        data
    })
}
// 作业人员-删除
export function deleteOperator(id) {
    return fetch({
        method:'delete',
        url:`/jobPerson/${id}`,
    })
}


// 作业工种
// 作业工种-分页查询
export function getJobProfessionList(params) {
    return fetch({
        method:'get',
        url:`/jobProfession`,
        params
    })
}
// 作业工种-新增
export function addJobProfession(data) {
    return fetch({
        method:'post',
        url:`/jobProfession`,
        data
    })
}
// 作业工种-编辑
export function updateJobProfession(id,data) {
    return fetch({
        method:'put',
        url:`/jobProfession/${id}`,
        data
    })
}
// 作业工种-删除
export function deleteJobProfession(id) {
    return fetch({
        method:'delete',
        url:`/jobProfession/${id}`,
    })
}

// 终端管理
// 终端管理-分页查询
export function getJobTerminalList(params) {
    return fetch({
        method:'get',
        url:`/jobTerminal`,
        params
    })
}
// 终端管理-新增
export function addJobTerminal(data) {
    return fetch({
        method:'post',
        url:`/jobTerminal`,
        data
    })
}
// 终端管理-编辑
export function updateJobTerminal(id,data) {
    return fetch({
        method:'put',
        url:`/jobTerminal/${id}`,
        data
    })
}
// 终端管理-删除
export function deleteJobTerminal(id) {
    return fetch({
        method:'delete',
        url:`/jobTerminal/${id}`,
    })
}


// 机械管理
// 机械管理-分页查询
export function getJobMachineryList(params) {
    return fetch({
        method:'get',
        url:`/jobMachinery`,
        params
    })
}
// 机械管理-新增
export function addJobMachinery(data) {
    return fetch({
        method:'post',
        url:`/jobMachinery`,
        data
    })
}
// 机械管理-编辑
export function updateJobMachinery(id,data) {
    return fetch({
        method:'put',
        url:`/jobMachinery/${id}`,
        data
    })
}
// 机械管理-删除
export function deleteJobMachinery(id) {
    return fetch({
        method:'delete',
        url:`/jobMachinery/${id}`,
    })
}

// 车辆管理
// 车辆管理-分页查询
export function getJobVehicleList(params) {
    return fetch({
        method:'get',
        url:`/jobVehicle`,
        params
    })
}
// 车辆管理-新增
export function addJobVehicle(data) {
    return fetch({
        method:'post',
        url:`/jobVehicle`,
        data
    })
}
// 车辆管理-编辑
export function updateJobVehicle(id,data) {
    return fetch({
        method:'put',
        url:`/jobVehicle/${id}`,
        data
    })
}
// 车辆管理-删除
export function deleteJobVehicle(id) {
    return fetch({
        method:'delete',
        url:`/jobVehicle/${id}`,
    })
}

// 专运线管理
// 专运线管理-分页查询
export function getSpecialTransportLineList(params) {
    return fetch({
        method:'get',
        url:`/specialTransportLine`,
        params
    })
}
// 专运线管理-新增
export function addSpecialTransportLine(data) {
    return fetch({
        method:'post',
        url:`/specialTransportLine`,
        data
    })
}
// 专运线管理-编辑
export function updateSpecialTransportLine(id,data) {
    return fetch({
        method:'put',
        url:`/specialTransportLine/${id}`,
        data
    })
}
// 专运线管理-删除
export function deleteSpecialTransportLine(id) {
    return fetch({
        method:'delete',
        url:`/specialTransportLine/${id}`,
    })
}

// 专运线机械配置管理
// 专运线机械配置管理-分页查询
export function getSpecialTransportLineMachineList(params) {
    return fetch({
        method:'get',
        url:`/specialTransportLineMachine`,
        params
    })
}
// 专运线机械配置管理-新增
export function addSpecialTransportLineMachine(data) {
    return fetch({
        method:'post',
        url:`/specialTransportLineMachine`,
        data
    })
}
// 专运线机械配置管理-编辑
export function updateSpecialTransportLineMachine(id,data) {
    return fetch({
        method:'put',
        url:`/specialTransportLineMachine/${id}`,
        data
    })
}
// 专运线机械配置管理-删除
export function deleteSpecialTransportLineMachine(id) {
    return fetch({
        method:'delete',
        url:`/specialTransportLineMachine/${id}`,
    })
}

// 查询货类-分页
export function getCargoTypeList(params) {
    return fetch({
        method:'get',
        url:`/cargoType`,
        params
    })
}
// 货类-新增
export function addCargoType(data) {
    return fetch({
        method:'post',
        url:`/cargoType`,
        data
    })
}
// 货类-编辑
export function updateCargoType(id,data) {
    return fetch({
        method:'put',
        url:`/cargoType/${id}`,
        data
    })
}
// 货类-删除
export function deleteCargoType(id) {
    return fetch({
        method:'delete',
        url:`/cargoType/${id}`,
    })
}

// 查询货名-分页
export function getCargoNameList(params) {
    return fetch({
        method:'get',
        url:`/cargoName`,
        params
    })
}

// 查询货名-分页
// export function getCargoNameList(id,params) {
//     return fetch({
//         method:'get',
//         url:`/cargoName/${id}`,
//         params
//     })
// }
// 货名-新增
export function addCargoName(data) {
    return fetch({
        method:'post',
        url:`/cargoName`,
        data
    })
}
// 货名-编辑
export function updateCargoName(id,data) {
    return fetch({
        method:'put',
        url:`/cargoName/${id}`,
        data
    })
}
// 货名-删除
export function deleteCargoName(id) {
    return fetch({
        method:'delete',
        url:`/cargoName/${id}`,
    })
}
// 理货人
export function getTally(params) {
    return fetch({
        method:'get',
        url:`/printing/deptPerson`,
        params
    })
}

// 获取列表
export function getAdminWarehouseList(params) {
    return fetch({
        method: 'get',
        url: `/warehouseArea`,
        params,
    })
}

//新增管辖库房
export function adminWarehouse(data) {  
    return fetch({
        method:'post',
        url:`/warehouseArea`,
        data,
    })
}
